home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / CMScriptingPlugin.p < prev    next >
Encoding:
Text File  |  1998-02-12  |  5.4 KB  |  174 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        CMScriptingPlugin.p
  3.  
  4.      Contains:    ColorSync Scripting Plugin API
  5.  
  6.      Version:    Technology:    ColorSync 2.5
  7.                  Release:    Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT CMScriptingPlugin;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __CMSCRIPTINGPLUGIN__}
  28. {$SETC __CMSCRIPTINGPLUGIN__ := 1}
  29.  
  30. {$I+}
  31. {$SETC CMScriptingPluginIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __FILES__}
  35. {$I Files.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __CMAPPLICATION__}
  38. {$I CMApplication.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __CODEFRAGMENTS__}
  41. {$I CodeFragments.p}
  42. {$ENDC}
  43.  
  44.  
  45.  
  46.  
  47. {$PUSH}
  48. {$ALIGN MAC68K}
  49. {$LibExport+}
  50.  
  51.  
  52. CONST
  53.                                                                 {  ColorSync Scripting AppleEvent Errors  }
  54.     cmspInvalidImageFile        = -4220;                        {  Plugin cannot handle this image file type  }
  55.     cmspInvalidImageSpace        = -4221;                        {  Plugin cannot create an image file of this colorspace  }
  56.     cmspInvalidProfileEmbed        = -4222;                        {  Specific invalid profile errors  }
  57.     cmspInvalidProfileSource    = -4223;
  58.     cmspInvalidProfileDest        = -4224;
  59.     cmspInvalidProfileProof        = -4225;
  60.     cmspInvalidProfileLink        = -4226;
  61.  
  62.  
  63. {*** embedFlags field  ***}
  64. { reserved for future use: currently 0 }
  65.  
  66. {*** matchFlags field  ***}
  67.     cmspFavorEmbeddedMask        = $00000001;                    {  if bit 0 is 0 then use srcProf profile, if 1 then use profile embedded in image if present }
  68.  
  69.  
  70.  
  71. TYPE
  72. {$IFC TYPED_FUNCTION_POINTERS}
  73.     ValidateImageProcPtr = FUNCTION({CONST}VAR spec: FSSpec): CMError; C;
  74. {$ELSEC}
  75.     ValidateImageProcPtr = ProcPtr;
  76. {$ENDC}
  77.  
  78. {$IFC TYPED_FUNCTION_POINTERS}
  79.     GetImageSpaceProcPtr = FUNCTION({CONST}VAR spec: FSSpec; VAR space: OSType): CMError; C;
  80. {$ELSEC}
  81.     GetImageSpaceProcPtr = ProcPtr;
  82. {$ENDC}
  83.  
  84. {$IFC TYPED_FUNCTION_POINTERS}
  85.     ValidateSpaceProcPtr = FUNCTION({CONST}VAR spec: FSSpec; VAR space: OSType): CMError; C;
  86. {$ELSEC}
  87.     ValidateSpaceProcPtr = ProcPtr;
  88. {$ENDC}
  89.  
  90. {$IFC TYPED_FUNCTION_POINTERS}
  91.     EmbedImageProcPtr = FUNCTION({CONST}VAR specFrom: FSSpec; {CONST}VAR specInto: FSSpec; embedProf: CMProfileRef; embedFlags: UInt32): CMError; C;
  92. {$ELSEC}
  93.     EmbedImageProcPtr = ProcPtr;
  94. {$ENDC}
  95.  
  96. {$IFC TYPED_FUNCTION_POINTERS}
  97.     MatchImageProcPtr = FUNCTION({CONST}VAR specFrom: FSSpec; {CONST}VAR specInto: FSSpec; qual: UInt32; srcIntent: UInt32; srcProf: CMProfileRef; dstProf: CMProfileRef; prfProf: CMProfileRef; matchFlags: UInt32): CMError; C;
  98. {$ELSEC}
  99.     MatchImageProcPtr = ProcPtr;
  100. {$ENDC}
  101.  
  102.     ValidateImageUPP = UniversalProcPtr;
  103.     GetImageSpaceUPP = UniversalProcPtr;
  104.     ValidateSpaceUPP = UniversalProcPtr;
  105.     EmbedImageUPP = UniversalProcPtr;
  106.     MatchImageUPP = UniversalProcPtr;
  107.  
  108. CONST
  109.     uppValidateImageProcInfo = $000000F1;
  110.     uppGetImageSpaceProcInfo = $000003F1;
  111.     uppValidateSpaceProcInfo = $000003F1;
  112.     uppEmbedImageProcInfo = $00003FF1;
  113.     uppMatchImageProcInfo = $003FFFF1;
  114.  
  115. FUNCTION NewValidateImageProc(userRoutine: ValidateImageProcPtr): ValidateImageUPP;
  116.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  117.     INLINE $2E9F;
  118.     {$ENDC}
  119.  
  120. FUNCTION NewGetImageSpaceProc(userRoutine: GetImageSpaceProcPtr): GetImageSpaceUPP;
  121.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  122.     INLINE $2E9F;
  123.     {$ENDC}
  124.  
  125. FUNCTION NewValidateSpaceProc(userRoutine: ValidateSpaceProcPtr): ValidateSpaceUPP;
  126.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  127.     INLINE $2E9F;
  128.     {$ENDC}
  129.  
  130. FUNCTION NewEmbedImageProc(userRoutine: EmbedImageProcPtr): EmbedImageUPP;
  131.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  132.     INLINE $2E9F;
  133.     {$ENDC}
  134.  
  135. FUNCTION NewMatchImageProc(userRoutine: MatchImageProcPtr): MatchImageUPP;
  136.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  137.     INLINE $2E9F;
  138.     {$ENDC}
  139.  
  140. FUNCTION CallValidateImageProc({CONST}VAR spec: FSSpec; userRoutine: ValidateImageUPP): CMError;
  141.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  142.     {To be implemented:  Glue to move parameters into registers.}
  143.     {$ENDC}
  144.  
  145. FUNCTION CallGetImageSpaceProc({CONST}VAR spec: FSSpec; VAR space: OSType; userRoutine: GetImageSpaceUPP): CMError;
  146.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  147.     {To be implemented:  Glue to move parameters into registers.}
  148.     {$ENDC}
  149.  
  150. FUNCTION CallValidateSpaceProc({CONST}VAR spec: FSSpec; VAR space: OSType; userRoutine: ValidateSpaceUPP): CMError;
  151.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  152.     {To be implemented:  Glue to move parameters into registers.}
  153.     {$ENDC}
  154.  
  155. FUNCTION CallEmbedImageProc({CONST}VAR specFrom: FSSpec; {CONST}VAR specInto: FSSpec; embedProf: CMProfileRef; embedFlags: UInt32; userRoutine: EmbedImageUPP): CMError;
  156.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  157.     {To be implemented:  Glue to move parameters into registers.}
  158.     {$ENDC}
  159.  
  160. FUNCTION CallMatchImageProc({CONST}VAR specFrom: FSSpec; {CONST}VAR specInto: FSSpec; qual: UInt32; srcIntent: UInt32; srcProf: CMProfileRef; dstProf: CMProfileRef; prfProf: CMProfileRef; matchFlags: UInt32; userRoutine: MatchImageUPP): CMError;
  161.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  162.     {To be implemented:  Glue to move parameters into registers.}
  163.     {$ENDC}
  164. {$ALIGN RESET}
  165. {$POP}
  166.  
  167. {$SETC UsingIncludes := CMScriptingPluginIncludes}
  168.  
  169. {$ENDC} {__CMSCRIPTINGPLUGIN__}
  170.  
  171. {$IFC NOT UsingIncludes}
  172.  END.
  173. {$ENDC}
  174.